package com.gliese.getjob;

import java.io.IOException;
import java.net.MalformedURLException;
import java.util.List;

import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlPage;

public class GetInfoFromWHUJob {
	public static void main(String[] args) throws FailingHttpStatusCodeException, MalformedURLException, IOException{
		final WebClient webClient = new WebClient();
		HtmlPage	page =	webClient.getPage("http://www.xsjy.whu.edu.cn/meet/search.do");//http://www.xsjy.whu.edu.cn/meet/search.do
		System.out.println(page.asText());
		List<?> list = page.getByXPath("//table");
		final HtmlElement second_table = (HtmlElement)list.get(1);
		System.out.println(second_table.asText());
	}
}
